import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;


public class SortingDriver {

	public static void main(String[] args) {
		HockeyPlayer kesler = new HockeyPlayer("Ryan", "Kesler");
		
		kesler.addGoal();
		kesler.addAssist();
		
		HockeyPlayer daniel = new HockeyPlayer("Daniel", "Sedin");
		daniel.addAssist();
		
		HockeyPlayer henrick = new HockeyPlayer("Henrick", "Sedin");
		henrick.addAssist();
		henrick.addAssist();
		henrick.addAssist();
		
		List<HockeyPlayer> canucks = new ArrayList<HockeyPlayer>();
		
		canucks.add(henrick);
		canucks.add(kesler);
		canucks.add(daniel);
		
		Comparator<HockeyPlayer> lastNameComparison = HockeyPlayer.byFirstName();
		
		HockeyPlayer smallest = Collections.min(canucks, lastNameComparison);

		Collections.sort(canucks, lastNameComparison);
		
		for(HockeyPlayer who : canucks) {
			System.out.println(who.getLastName() + " " + who.getFirstName() + " " + who.getTotalPoints());
		}
	}

}
